import React from 'react';

class NameCard extends React.Component {

  render() {
    const {name,phoneNumber,isHuman,tags}=this.props;
    return (
      <div className="alert alert-success">
        <h4 className="alert-heading fw-bold fs-3">{name}</h4>
        <ul>
          <li>电话：{phoneNumber}</li>
          <li>{isHuman? '人类':"外星生物"}</li>
        </ul>
        <hr />
        <p>
          好友印象：{tags.map((tag,index) => (
            <span className="badge bg-primary rounded-pill mx-1" key={index}>{tag}</span>
          ))}
        </p>
      </div>);
  }
}

export default NameCard;
